onload = () => {
    loadCSS("../css/fontello.css", "bootstrap5-icon");
    loadCSS("../css/bootstrap5.min.css", "bootstrap5");
    loadScript("../js/bootstrap5.bundle.min.js")
        .then(() => loadScript("../js/crud.js")).then(() => {
        let clientOperator = new Crud({
            module: "client",
            hasCheckbox: true,
            iterators: [],
            opsButton: ["new",{caption:"upload"}],
            search: [{"caption": "Name", "type": "text", "name": "name", class: "col-3"},
                {"caption": "Code", "type": "text", "name": "code", class: "col-3"}
            ],
            listField: [{"caption": "ID", "field": "clientId"}, {"caption": "Name", "field": "name"}, {
                "caption": "Code", "field": "code"
            }],
            editFields: [
                {"name": "code", "placeHolder": "client name", "required": "required"},
                {"name": "name", "placeHolder": "client code", "required": "required"}
            ]
        });
        clientOperator.init()
    }).catch((err) => console.error(err));
}
